//logs.js
const util = require('../../utils/util.js')

Page({
  data: {
    logs: []
  },
  onLoad: function () {
    //  console.log(this.animate)
    setInterval(()=>{
      this.setAmin();
    },1000)
  },
  setAmin() {
    this.animate(".box", [{
        opacity: 1.0,
        rotate: 0,
        backgroundColor: '#FF0000'
      },
      {
        opacity: 0.5,
        rotate: 45,
        backgroundColor: '#00FF00'
      },
      {
        opacity: 0.0,
        rotate: 90,
        backgroundColor: '#FF0000'
      },
    ], 1000, () => {
      //动画执行完毕一个回调
      this.clearAnimation('.box', {
        opacity: true,
        rotate: true
      }, function () {
        console.log("清除了#container上的opacity和rotate属性")
      })
    })
  }
})